import request from '@/utils/request'

// 获取评论列表
export function getCommentList(params) {
  return request({
    url: '/blog-core/back/comment/list',
    method: 'get',
    params
  })
}

// 查询子评论
export function getSubCommentList(params) {
  return request({
    url: '/blog-core/back/comment/childrenList',
    method: 'get',
    params
  })
}

// 添加评论
export function addComment(data) {
  return request({
    url: '/blog-core/back/comment',
    method: 'post',
    data
  })
}

// 删除评论
export function deleteComment(id) {
  return request({
    url: '/blog-core/back/comment/' + id,
    method: 'delete'
  })
}
